package com.tabjin.rfidsocket.mapper.mapper;

import com.tabjin.rfidsocket.mapper.my.mapper.MyMapper;
import com.tabjin.rfidsocket.pojo.SysUser;
import com.tabjin.rfidsocket.pojo.vo.SysUserVO;
import com.tabjin.rfidsocket.pojo.vo.UserVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SysUserCustomMapper extends MyMapper<SysUserVO> {

    /**
     * @param keyword
     * @return
     */
    SysUserVO findByKeyword(@Param("keyword") String keyword);

    /**
     * 根据邮件计数
     *
     * @param mail
     * @param id
     * @return
     */
    Integer countByMail(@Param("mail") String mail, @Param("id") Integer id);

    /**
     * @param telephone
     * @param id
     * @return
     */
    Integer countByTelephone(@Param("telephone") String telephone, @Param("id") Integer id);

    /**
     * 部门下用户数量
     *
     * @param deptId
     * @return
     */
    Integer countByDeptId(@Param(value = "deptId") Integer deptId);

    List<SysUserVO> getUserByUserIdList(@Param(value = "userIdList") List<Integer> userIdList);

    /**
     *
     * @return
     */
    List<UserVO> getUsersDetailed();
}